﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace SimpleExpression
{
    /// <summary>
    /// Esta clase se utilizara para crear el CreatePlanSQL,  SelectPlanSQL, UpdatePlanSQL, DeletePlanSQL
    /// </summary>
    public abstract class QueryPlanSQL : QueryPlanBase
    {
        protected IDbCommand command;

        public QueryPlanSQL()
            :base()
        {
            this.command = new SqlCommand(string.Empty);
        }

        public override object Command
        {
            get
            {
                if (((IDbCommand)this.command).CommandText.Length == 0)
                    this.GetResult();
                
                return this.command;
            }
        }
    }

}
